/*
 * NoSettingsPanel.java
 *
 * Created on July 15, 2006, 4:14 PM
 */

package net.anzix.jimposition.transformations;

import javax.swing.JRadioButton;


public class ParityFilterPanel extends javax.swing.JPanel {
    /**
     * Creates new form NoSettingsPanel
     */
    public ParityFilterPanel() {
        initComponents();
    }

    public Boolean isEven() {
        return new Boolean(evenPagesRadio.isSelected());
    }

    public void setEven(Boolean even) {
        if (even.booleanValue()) evenPagesRadio.setSelected(true);
        else oddPagesRadio.setSelected(true);
        
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel2 = new javax.swing.JLabel();
        evenPagesRadio = new javax.swing.JRadioButton();
        oddPagesRadio = new javax.swing.JRadioButton();

        jLabel2.setText("Selected pages:");

        evenPagesRadio.setText("Even pages");
        evenPagesRadio.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));

        oddPagesRadio.setText("Odd pages");
        oddPagesRadio.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel2)
                    .add(evenPagesRadio)
                    .add(oddPagesRadio))
                .addContainerGap(59, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel2)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(evenPagesRadio)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(oddPagesRadio)
                .addContainerGap(21, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JRadioButton evenPagesRadio;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JRadioButton oddPagesRadio;
    // End of variables declaration//GEN-END:variables

    public JRadioButton getEvenPagesRadio() {
        return evenPagesRadio;
    }

    public void setEvenPagesRadio(JRadioButton evenPagesRadio) {
        this.evenPagesRadio = evenPagesRadio;
    }

    public JRadioButton getOddPagesRadio() {
        return oddPagesRadio;
    }

    public void setOddPagesRadio(JRadioButton oddPagesRadio) {
        this.oddPagesRadio = oddPagesRadio;
    }
    
}
